package com.yu.smsinterceptor.adapter;

import android.content.Context;
import android.widget.TextView;

import com.yu.smsinterceptor.R;
import com.yu.smsinterceptor.mode.Phone;

import java.util.List;

/**
 * 拦截号码列表的适配器
 */
public class InterceptPhoneListAdapter extends BaseRecyclerAdapter<Phone> {

    /**
     * @param context
     * @param data
     */
    public InterceptPhoneListAdapter(Context context, List<Phone> data) {
        super(context, data);
    }

    @Override
    public void bindData(BaseViewHolder holder, Phone phone) {
        TextView tv_phoneNumber = (TextView) holder.getView(R.id.tv_phone_number);
        tv_phoneNumber.setText(phone.getPhoneNumber().toString());
    }

    @Override
    public int getItemLayoutId() {
        return R.layout.item_intercept_phone;
    }
}
